PowerTCP Mail for .NET
Multipart Constructor(String,String,FileInfo[])




Used to initialize Text (Parts[0]). If null or empty no Textpart is created.
Used to initialize Html (Parts[1]). If null or empty an ArgumentNullException is thrown.
Used to initialized a "multipart/related" part (Parts[1]) that provides linked embedded resources referenced by Html. If null an Htmlpart is created instead.
Initializes Parts with new Textpart, Htmlpart and linked Resource parts.
Syntax
Public Function New( _
   ByVal text As String, _
   ByVal html As String, _
   ByVal htmlResources() As FileInfo _
)
Dim text As String
Dim html As String
Dim htmlResources() As FileInfo
 
Dim instance As New Multipart(text, html, htmlResources)
public Multipart( 
   string text,
   string html,
   FileInfo[] htmlResources
)
public: Multipart( 
   string* text,
   string* html,
   FileInfo*[]* htmlResources
)
public:
Multipart( 
   String^ text,
   String^ html,
   array<FileInfo^>^ htmlResources
)

Parameters

text
Used to initialize Text (Parts[0]). If null or empty no Textpart is created.
html
Used to initialize Html (Parts[1]). If null or empty an ArgumentNullException is thrown.
htmlResources
Used to initialized a "multipart/related" part (Parts[1]) that provides linked embedded resources referenced by Html. If null an Htmlpart is created instead.
Exceptions
ExceptionDescription
System.ArgumentExceptionhtmlResources missing reference to an HTML link.
System.ArgumentNullExceptionhtml cannot be null or empty.
Remarks

This constructor is used to create HTML email. multipart/alternative and/or multipart/related parts are created to represent the parameters provided.

If text is null or empty, then html and htmlResources are used to create either a text/html part or a mulipart/related part that contains a text/html part. Otherwise, Part.ContentType is set to "multipart/alternative" and 2 parts (text/plain, and a text/html or multipart/related) are created and saved in Parts.

If htmlResources is null, then html is represented as a single Htmlpart. Otherwise, a new "multipart/related" Multipart is created and initialized with html and linked htmlResources.

See Also

Reference

Multipart Class
Multipart Members
Overload List


PowerTCP Mail for .NET Documentation Version 4.3
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic